/**
 * @Auther: ChenforCode
 * @Date: 2018/9/11 12:06
 * @Description:
 */
package cn.chenforcode.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.sql.Timestamp;

@Entity
public class AdminBookRecord {
    private String aname;
    private String bno;
    private Timestamp abDate;

    @Basic
    @Column(name = "ANAME")
    public String getAname() {
        return aname;
    }

    public void setAname(String aname) {
        this.aname = aname;
    }

    @Basic
    @Column(name = "BNO")
    public String getBno() {
        return bno;
    }

    public void setBno(String bno) {
        this.bno = bno;
    }

    @Id
    @Column(name = "AB_DATE")
    public Timestamp getAbDate() {
        return abDate;
    }

    public void setAbDate(Timestamp abDate) {
        this.abDate = abDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AdminBookRecord that = (AdminBookRecord) o;

        if (aname != null ? !aname.equals(that.aname) : that.aname != null) return false;
        if (bno != null ? !bno.equals(that.bno) : that.bno != null) return false;
        if (abDate != null ? !abDate.equals(that.abDate) : that.abDate != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = aname != null ? aname.hashCode() : 0;
        result = 31 * result + (bno != null ? bno.hashCode() : 0);
        result = 31 * result + (abDate != null ? abDate.hashCode() : 0);
        return result;
    }

    public AdminBookRecord(String aname, String bno, Timestamp abDate) {
        this.aname = aname;
        this.bno = bno;
        this.abDate = abDate;
    }

    public AdminBookRecord() {
    }
}
